import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import App from './App.vue'
import router from './route/route'
import '@/utils/permissionDirect.js'
import toast from '@/components/toast/index'
import request from './network/request'
import store from './store'
import '@/utils/index.js'

Vue.use(ElementUI)
Vue.use(toast)
// 请求
Vue.prototype.$post = request.post
Vue.prototype.$get = request.get
Vue.prototype.$put = request.put
Vue.prototype.$baseURL = request.baseURL
Vue.prototype.$delete = request.delete
Vue.prototype.$download = request.download
Vue.prototype.$upload = request.upload

Vue.config.productionTip = false
// this.$toast.show('退出登录', 3000)
new Vue({
  router,
  store,
  beforeCreate() {
    Vue.prototype.$bus = this
  },
  render: h => h(App)
}).$mount('#app')
